General Reflection

Reflected Point:
x = (a-p) cos(2A) + (b-q) sin(2A)+p
y = (a-p) sin(2A) - (b-q) cos(2A) +q

CONTROL POINT AND LINE WITH SLIDERS

p = 1.2 (slider from -5 to 15, step 0.1)
q = 1.8 (slider from -5 to 10, step 0.1)
α = 1.1344640137963142 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
b = 3.7 (slider from -5 to 10, step 0.1)
a = 4.2 (slider from -5 to 15, step 0.1)
A_1 = Intersect(xAxis, yAxis)
B = Point(Circle[A_1, a])
b_1 = Segment(A_1, B)
C = Point(Circle[A_1, b])
c = Segment(A_1, C)
d: x = a
e: y = b
D = Intersect(d, e)
P: (p, q)
D': ((a - p) * cos(2 * α) + (b - q) * sin(2 * α) + p, (a - p) * sin(2 * α) - (b - q) * cos(2 * α) + q)
g = Segment(D, D')
f = If(α ≟ 90° ∨ α ≟ 270°, x = p, y = (x - p) * tan(α) + q)